package com.cskaoyan.mapper;

import com.cskaoyan.bean.MallRole;
import com.cskaoyan.bean.MallRoleExample;
import com.cskaoyan.model.vo.system.SimpleRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MallRoleMapper {
    long countByExample(MallRoleExample example);

    int deleteByExample(MallRoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MallRole record);

    int insertSelective(MallRole record);

    List<MallRole> selectByExample(MallRoleExample example);

    /**
     * 查询出id和label
     */
    List<SimpleRole> selectSimpleByExample();


    MallRole selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MallRole record, @Param("example") MallRoleExample example);

    int updateByExample(@Param("record") MallRole record, @Param("example") MallRoleExample example);

    int updateByPrimaryKeySelective(MallRole record);

    int updateByPrimaryKey(MallRole record);

    /**
     * 插入
     *
     * @param mallRole
     * @return
     */
    Integer insertRole(@Param("mallRole") MallRole mallRole);

    Integer selectByName(@Param("name") String name);
}
